﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace _3D
{
    class Stairs
    {
        public List<GameObject3D> stairs;

        public Stairs(Vector3 position, GraphicsDevice graphics, Camera camera, int ladoFrente, int degraus, int largura, int size)
        {
            stairs = new List<GameObject3D>();

            for (int i = 0; i < largura; i++)
            {
                for (int j = 0; j < degraus; j++)
                {
                    stairs.Add(new Bloco(size, graphics, camera, new Vector3(2* size *j + position.X * i/2 , 2*size* i +position.Y, size + position.Z)));
                }
            }
        }
        public void Update(Camera camera)
        {
            foreach (GameObject3D ob in stairs)
                ob.Update(camera);
            
        }
        public void Draw(GraphicsDevice graphics)
        {
            foreach (GameObject3D ob in stairs)
                ob.Draw(graphics);
        }
    }
}
